import React from 'react'
import {StyleSheet,View,Text,Image} from 'react-native'
import {PropTypes} from 'prop-types';
import px from '../util/px'

export default function RefreshModule({text,isShowIcon}){
    return(<View style={{borderTopWidth:1,borderTopColor:"#f3f3f3",flexDirection:'row',backgroundColor:'#ffffff',alignItems:'center',justifyContent:'center',height:px(96)}}>
             <Text style={{fontSize:14,color:'#000000'}}>{text}</Text>
             {isShowIcon?<Image 
             style={{marginLeft:px(10),height:px(30),width:px(30)}}
             source={require("../images/icon_refresh.png")}/>:null}
    </View>)
}

RefreshModule.propTypes={
    isShowIcon:PropTypes.bool,
    text:PropTypes.string.isRequired,
}
RefreshModule.defaultProps={
    isShowIcon:false
}